package com.killer.goods.controller;


import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.killer.common.entity.Result;
import com.killer.db.controller.BaseController;
import com.killer.goods.dto.SkuChangeDTO;
import com.killer.goods.entity.Sku;
import com.killer.goods.service.ISkuService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 标准产品单位表 前端控制器
 * </p>
 *
 * @author killer
 * @since 2021-08-29
 */
@RestController
@RequestMapping("/sku")
public class SkuController extends BaseController<ISkuService, Sku> {

    @PostMapping("/changeSkuInventoryAndSaleNum")
    public Result changeSkuInventoryAndSaleNum(@RequestBody List<SkuChangeDTO> dtos) {
        baseService.changeSkuInventoryAndSaleNum(dtos);
        return Result.success();
    }
}
